<script setup lang="ts">

import SonSon from "@/components/sonSon.vue";
import {ref} from "vue";

let fatherData = ref('父组件的数据')
// 一个对象的所有属性都当作 props 传入
const post = {
  id: 1,
  title: 'My Journey with Vue'
}
let countModel = ref(0)
let flag = ref(false)

function show() {
  flag.value = true
}
function handleChange(data:any){
  console.log(data,'data')
}
</script>

<template>
  父组件
  <!--  <son-son :toSon="fatherData" v-bind="post"></son-son>-->
  <!--  <son-son v-model="countModel"></son-son>-->
<!--  <son-son v-model="flag"></son-son>-->
<!--  <button @click="show">显示</button>-->
  <son-son @change="handleChange"></son-son>
</template>

<style scoped>

</style>
